<?php /* Smarty version 2.6.26, created on 2014-02-20 13:25:57
         compiled from admin/goods/update.html */ ?>
<?php require_once(SMARTY_CORE_DIR . 'core.load_plugins.php');
smarty_core_load_plugins(array('plugins' => array(array('function', 'html_options', 'admin/goods/update.html', 22, false),array('function', 'html_radios', 'admin/goods/update.html', 40, false),)), $this); ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link rel="stylesheet" type="text/css" href="view/admin/style/basic.css" />
<link rel="stylesheet" type="text/css" href="view/admin/style/goods.css" />
<script type="text/javascript" src="view/admin/js/ajax.js"></script>
<script type="text/javascript" src="view/admin/js/goods_update.js"></script>
<script type="text/javascript" src="./ckeditor/ckeditor.js"></script>
<title>Insert title here</title>
</head>
<body>
    <h2><a href="?a=goods">返回商品列表</a>商品 -- 修改商品</h2>
    <form method="post" name="add" action="?a=goods&m=update&id=<?php echo $this->_tpl_vars['oneGoods'][0]->id; ?>
">
    <input type="hidden" name="brandid" value="<?php echo $this->_tpl_vars['oneGoods'][0]->brand; ?>
" id="brandid" />
    <input type="hidden" name="attrid" value="<?php echo $this->_tpl_vars['oneGoods'][0]->attr; ?>
" id="attrid" />
        <dl class="form">
            <dd>商品类型：<select name="nav" id="nav">
                        <option value="-1" selected="selected">--请选择一个商品的类型--</option>
                        <?php $_from = $this->_tpl_vars['allNav']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }if (count($_from)):
    foreach ($_from as $this->_tpl_vars['key'] => $this->_tpl_vars['value']):
?>
                        <optgroup label="<?php echo $this->_tpl_vars['value']->name; ?>
">
                        <?php echo smarty_function_html_options(array('options' => $this->_tpl_vars['value']->child,'selected' => $this->_tpl_vars['oneGoods'][0]->nav), $this);?>

                        </optgroup>
                        <?php endforeach; endif; unset($_from); ?>
                        </select> <span class="red">[必选]</span>
            </dd>
            <dd>商品品牌：<select name="brand" id="brand">
                        <option value="-1" selected="selected">--请选择一个商品的品牌--</option>
                        </select> <span class="red">[必选]</span>
            </dd>
            <dd>商品名称：<input type="text" name="name" value="<?php echo $this->_tpl_vars['oneGoods'][0]->name; ?>
" class="text"/> <span class="red">[必填]</span> ( * 2~100字符之间)</dd>
            <dd>商品编号：<input type="text" name="sn" class="text" value="<?php echo $this->_tpl_vars['oneGoods'][0]->sn; ?>
"/> <span class="red">[必填]</span> ( * 2~50字符之间,唯一)</dd>
            <dd>销 售 价：<input type="text" name="price_sale" class="text small" value="<?php echo $this->_tpl_vars['oneGoods'][0]->price_sale; ?>
" /> 市 场 价：<input type="text" name="price_market" class="text small" value="<?php echo $this->_tpl_vars['oneGoods'][0]->price_market; ?>
"/> 成 本 价：<input type="text" name="price_cost" class="text small" value="<?php echo $this->_tpl_vars['oneGoods'][0]->price_cost; ?>
"/>( * 成本价不在前提显示)</dd>
            <dd>关 键 字：<input type="text" name="keyword" class="text" value="<?php echo $this->_tpl_vars['oneGoods'][0]->keyword; ?>
"/> (例如：换季|白色|冬季;每个关键词使用'|'隔开)</dd>
            <dd>计量单位：<input type="text" name="unit" class="text small" value="<?php echo $this->_tpl_vars['oneGoods'][0]->unit; ?>
"/> 重　　量：<input type="text" name="weight" class="text small" value="<?php echo $this->_tpl_vars['oneGoods'][0]->weight; ?>
"/> ( * 计量单位：个，kg，件；重量：默认kg)</dd>
            <dd>上传图片：<input type="text" name="thumbnail" class="text" value="<?php echo $this->_tpl_vars['oneGoods'][0]->thumbnail; ?>
" readonly="readonly">
                <input type="button" value="上传缩略图" onclick="centerWindow('?a=call&m=upFile','upfile',400,150);">
                <img name="pic" style="display:block" src="<?php echo $this->_tpl_vars['oneGoods'][0]->thumbnail; ?>
"/>　(图片类型jpg/png/gif任选一,大小不超200k)</dd>
            <dd><textarea id="TextArea1" name="content" class="ckeditor"><?php echo $this->_tpl_vars['oneGoods'][0]->content; ?>
</textarea></dd>
            <dd>是否上架：<?php echo smarty_function_html_radios(array('options' => $this->_tpl_vars['bool'],'selected' => $this->_tpl_vars['oneGoods'][0]->is_up,'name' => 'is_up'), $this);?>
　免运费：<?php echo smarty_function_html_radios(array('options' => $this->_tpl_vars['bool'],'selected' => $this->_tpl_vars['oneGoods'][0]->is_freight,'name' => 'is_freight'), $this);?>
</dd>    
            <dd>售后服务：<?php echo smarty_function_html_radios(array('name' => 'service','options' => $this->_tpl_vars['allService'],'checked' => $this->_tpl_vars['oneGoods'][0]->service), $this);?>
</dd>
            <dd>库　　存：<input type="text" name="inventory" class="text small" value="<?php echo $this->_tpl_vars['oneGoods'][0]->inventory; ?>
"/> 库存告急:<input type="text" name="warn_inventory" class="text small" value="<?php echo $this->_tpl_vars['oneGoods'][0]->warn_inventory; ?>
"/> ( * 库存达到额定数量将会在后台提醒)</dd>
            <dd><input type="submit" name="send" value="修改商品" onclick="return checkUpdateGoods();" /></dd>
        </dl>
    </form>
</body>
</html>